<local:DocumentBase x:Class="WPFExcelReport.TSTVK02"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:ChartEx="clr-namespace:WPFExcelReport.Chart;assembly=ITXVIEWS"
                    xmlns:MAH="http://metro.mahapps.com/winfx/xaml/controls"
                    xmlns:WB="clr-namespace:WPFExcelReport;assembly=TWBBST"
                    xmlns:WG="clr-namespace:WPFExcelReport;assembly=TWGBST"
                    xmlns:WK="clr-namespace:WPFExcelReport;assembly=TWBDAT"
                    xmlns:WD="clr-namespace:WPFExcelReport;assembly=TWDECK" 
                    xmlns:LS="clr-namespace:WPFExcelReport;assembly=TLIEFDAT" 
                    xmlns:KD="clr-namespace:WPFExcelReport;assembly=TKDSTAMM"  
                    xmlns:ZB="clr-namespace:WPFExcelReport;assembly=TVKZUAB"   
                    xmlns:VVT="clr-namespace:WPFExcelReport;assembly=TVVTLIEF"
                    xmlns:VV="clr-namespace:WPFExcelReport;assembly=TVVLIEF"  
                    xmlns:VP="clr-namespace:WPFExcelReport;assembly=TVVPACK" 
                    xmlns:VRP="clr-namespace:WPFExcelReport;assembly=TVRPOS"
                    xmlns:WS="clr-namespace:WPFExcelReport;assembly=TWASTAMM"
                    xmlns:WF="clr-namespace:WPFExcelReport;assembly=TWAFARBEN"
                    xmlns:U="clr-namespace:WPFExcelReport;assembly=ITXUI"  
                    xmlns:VA="clr-namespace:WPFExcelReport;assembly=TVAART"
                    xmlns:VF="clr-namespace:WPFExcelReport;assembly=TVAFARBEN" 
                    xmlns:VK="clr-namespace:WPFExcelReport;assembly=TVKKOPF" 
                    xmlns:VKP="clr-namespace:WPFExcelReport;assembly=TVKPOS"  
                    xmlns:EK="clr-namespace:WPFExcelReport;assembly=TEKKOPF" 
                    xmlns:EKP="clr-namespace:WPFExcelReport;assembly=TEKPOS"  
                    xmlns:MU="clr-namespace:WPFExcelReport;assembly=TABAUFM"  
                    xmlns:WBW="clr-namespace:WPFExcelReport;assembly=TICC_WBBEW"  
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"                    
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"  
                    xmlns:me="clr-namespace:WPFExcelReport"
                    FontSize="12"
                    Name="TV"
                    Loaded="Window_Loaded"
>
    <local:DocumentBase.Resources>
        <ucd:BoolToVisibilityConverter x:Key="bv"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </local:DocumentBase.Resources>
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition   Height="1*" />
            <RowDefinition   Height="1*" />
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <VKP:TFVK02 Grid.Row="0" Grid.Column="0"  Grid.ColumnSpan="2"
                        Name="cVK02"/>

        <Grid  Grid.Row="1" Grid.Column="0" >
            <Grid.RowDefinitions>
                <RowDefinition   Height="Auto" />
                <RowDefinition   Height="1*" />
                <RowDefinition   Height="Auto" />
                <RowDefinition   Height="Auto" />
            </Grid.RowDefinitions>
            <U:TSTVKPOS Grid.Row="1"  Name="cVKP" 
                        ORDERNUM="{Binding AUF,ElementName=cVK02}"   
                         MinWidth="200" MinHeight="50" />
            <WD:TWDECK   Grid.Row="2" Name="cWD"
                        ORDERNUM="{Binding AUF,ElementName=cVKP}"
                        IsOrder="False"
                         /> 
        </Grid>

        <MAH:MetroTabControl Grid.Row="1" Grid.Column="1">

            <MAH:MetroTabItem Header="{Binding Source={Localization:Translate Word=发货信息}}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="1*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <VVT:TVVTLIEF Name="cVVT"  Grid.Row="0"  Grid.Column="0" Grid.RowSpan="10"                         
                       VKP="{Binding AUF,ElementName=cVKP}" 
                    />
                    <WrapPanel  Grid.Row="0"  Grid.Column="1">
                        <CheckBox Content="{Binding Source={Localization:Translate Word=已留位}}" IsChecked="{Binding IsShow,ElementName=cWB06}"></CheckBox>
                        <CheckBox Content="{Binding Source={Localization:Translate Word=已确认}}" IsChecked="{Binding IsShow,ElementName=cWZ04}"></CheckBox>
                        <CheckBox Content="{Binding Source={Localization:Translate Word=已发货}}" IsChecked="{Binding IsShow,ElementName=cKO}"></CheckBox>
                    </WrapPanel>
            <WB:TWB2WH Grid.Row="1" Grid.Column="1" SLO="01" SLB="CP" 
                         IsCanNew="False"  
                         Name="cWB06"
                         IsVV="False" 
                         ORDERNUM="{Binding KEY,ElementName=cVVT}"
                         />
             <WB:TWB2WH Name="cWZ04" Grid.Row="2" Grid.Column="1" SLO="01" SLB="CW" MinWidth="200"
                         MinHeight="50" 
                         ORDERNUM="{Binding KEY,ElementName=cVVT}"
             />
             <WB:TWB2WH Grid.Row="3" Grid.Column="1" Name="cKO" 
                         SLO="01" SLB="KO" MinWidth="200" MinHeight="50" 
                         ORDERNUM="{Binding KEY,ElementName=cVVT}"/>
             </Grid>
            </MAH:MetroTabItem>
            <MAH:MetroTabItem Header="{Binding Source={Localization:Translate Word=采购}}">
                <MAH:MetroTabControl Grid.Row="1" Grid.Column="1">
                    <MAH:MetroTabItem Header="{Binding Source={Localization:Translate Word=采购单}}">
                        <Grid >
                            <Grid.RowDefinitions>
                                <RowDefinition   Height="Auto" />
                                <RowDefinition   Height="1*" />
                            </Grid.RowDefinitions>
                            <WrapPanel  Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="10" >
                                <MU:TVKMU   Grid.Row="0" Grid.Column="0"  Name="cMU" 
                              VKAUF="{Binding AUF,ElementName=cVKP}" />
                                <EK:TEK04 Grid.Row="0" Grid.Column="1" Name="cEK"
                              ORDERNUM="{Binding ABAUF,ElementName=cMU}"/>
                            </WrapPanel>
                            <EKP:TEK05 Grid.Row="1" Grid.Column="0" Name="cEKP" 
                              ORDERNUM="{Binding ABAUF,ElementName=cMU}"/>
                        </Grid>

                    </MAH:MetroTabItem>
                    <MAH:MetroTabItem Header="{Binding Source={Localization:Translate Word=送货信息}}">
                        <WBW:TEKWB Grid.Row="2" Grid.Column="0" IsTemp="False"  
                               ORDERNUM="{Binding AUF,ElementName=cEKP}"/>

                    </MAH:MetroTabItem>

                </MAH:MetroTabControl>

            </MAH:MetroTabItem>
            <MAH:MetroTabItem Header="{Binding Source={Localization:Translate Word=发票信息}}">
                <Grid >
                    <Grid.RowDefinitions>
                        <RowDefinition   Height="Auto" />
                        <RowDefinition   Height="1*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <VRP:TVWVR05 Grid.Row="1" Grid.Column="0"
                     VKP="{Binding AUF,ElementName=cVKP}" 
                     IsAuto="False"  />
                </Grid >

            </MAH:MetroTabItem>
            <MAH:MetroTabItem  Header="{Binding Source={Localization:Translate Word=客户信息}}">
                <KD:TKD Grid.Row="1" Grid.Column="0" Name="cKD"
                            ORDERNUM="{Binding KUNDNR,ElementName=cVKP}"    
                            />
            </MAH:MetroTabItem>
            <MAH:MetroTabItem  Header="{Binding Source={Localization:Translate Word=供应商信息}}">
                <LS:TLS03 Grid.Row="1" Grid.Column="1" Name="cLS"
                            ORDERNUM="{Binding LIEFNR,ElementName=cEK}"    
                            />
            </MAH:MetroTabItem>
            <MAH:MetroTabItem  Header="{Binding Source={Localization:Translate Word=代理折扣附加费}}">
                <ZB:TVKZUAB Grid.Row="1" Grid.Column="2" Name="cZBP" 
                        Margin="10"
                        IsAuto="True"   
                        MaxHeight="300" 
                        VKZSA="VK"
                       ORDERNUM="{Binding AUF,ElementName=cVKP}"  />
            </MAH:MetroTabItem>
            <MAH:MetroTabItem  Header="{Binding Source={Localization:Translate Word=品种信息}}">
                <StackPanel>
                    <VF:TVA10 Name="cSVA10" Grid.Column="0"
                              ORDERNUM="{Binding VART,ElementName=cVKP}" />
                    <WS:TWASTAMM  Grid.Row="1" Grid.Column="3"  
                           IsAuto="True" 
                           ORDERNUM="{Binding PRART,ElementName=cSVA10}"/>
                </StackPanel>

            </MAH:MetroTabItem>
        </MAH:MetroTabControl>
        <Expander Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2">
            <Expander.Header>
                <WrapPanel>
                    <TextBlock Text="{Binding Source={Localization:Translate Word=统计信息}}"></TextBlock>
                </WrapPanel>
            </Expander.Header>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="1*"></RowDefinition>
                </Grid.RowDefinitions>
                <WrapPanel>
                    <Button Content="{Binding Source={Localization:Translate Word=初始化}}" Height="33" Margin="10,0,0,0"  Width="122" Panel.ZIndex="8"
                        Click="btnCharting_Click"/>
                </WrapPanel>
                <ChartEx:ChartEx0004 Grid.Row="1"   Name="Chart04" />
            </Grid>
        </Expander>
    </Grid>
</local:DocumentBase>
    
